#ifndef REPORTTASK_H
#define REPORTTASK_H

#include <QObject>
#include <QTimer>
#include <QFile>
#include <QString>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QXmlStreamReader>
#include <QCryptographicHash>

class ReportTask : public QObject
{
    Q_OBJECT
public:
    explicit ReportTask(QNetworkAccessManager* m ,QString addr , QString repFilePath, QObject *parent = NULL);
    ~ReportTask();
    void taskStart();

private:
    QNetworkAccessManager* manager;
    QNetworkReply* reply;
    QString reportPath;
    QString nUrl;
    bool taskFlag;

    void taskFinish();
    void readXmlRst(QByteArray rst);

signals:
    void reportRst(bool);

public slots:

private slots:
    void recvGoodsReport();
    void sendTimeOut();
};

#endif // REPORTTASK_H
